
#ifndef WXSANGULARREGULATOR_H
#define WXSANGULARREGULATOR_H

#include "wxwidgets/wxswidget.h"


class wxsAngularRegulator : public wxsWidget
{
	public:
		wxsAngularRegulator(wxsItemResData* Data);
		virtual ~wxsAngularRegulator();
	protected:
	private:
        virtual void OnBuildCreatingCode();
        virtual wxObject* OnBuildPreview(wxWindow* Parent,long Flags);
        virtual void OnEnumWidgetProperties(long Flags);

		long						m_iValue;								
		long						m_iRangeMin;						
		long						m_iRangeMax;					
		long						m_iAngleMin;						
		long						m_iAngleMax;						
		wxsColourData	m_cdExternalCircleColour;
		wxsColourData	m_cdInternalCircleColour;
		wxsColourData	m_cdKnobBorderColour;	
		wxsColourData	m_cdKnobColour;				
		wxsColourData	m_cdLimitTextColour;		
		wxsColourData	m_cdTagColour;					

        // Dynamic properties.
        
        struct TagDesc{
            wxPGId 	id;														
            int			val;														
        };
        WX_DEFINE_ARRAY(TagDesc*, TagArray);

        TagArray m_arrTags;											
        wxPGId m_TagCountId;										

        void OnAddExtraProperties(wxsPropertyGridManager* Grid);
        void OnExtraPropertyChanged(wxsPropertyGridManager* Grid,wxPGId id);
        bool OnXmlRead(TiXmlElement* Element,bool IsXRC,bool IsExtra);
        bool OnXmlWrite(TiXmlElement* Element,bool IsXRC,bool IsExtra);
		void InsertPropertyForTag(wxsPropertyGridManager* Grid,int Position);
		bool HandleChangeInTag(wxsPropertyGridManager* Grid,wxPGId id,int Position);

};

#endif // WXSANGULARREGULATOR_H
